<!DOCTYPE html>
<html class="writer-html5" lang="en" data-content_root="../../">
<head>
  <meta charset="utf-8" /><meta name="viewport" content="width=device-width, initial-scale=1" />

  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  <title>logtalk_make/1 &mdash; The Logtalk Handbook v3.93.0-b01 documentation</title>
      <link rel="stylesheet" type="text/css" href="../../_static/pygments.css?v=d75fae25" />
      <link rel="stylesheet" type="text/css" href="../../_static/css/theme.css?v=19f00094" />
      <link rel="stylesheet" type="text/css" href="../../_static/css/custom.css?v=396eccfe" />

  
  <!--[if lt IE 9]>
    <script src="../../_static/js/html5shiv.min.js"></script>
  <![endif]-->
  
        <script src="../../_static/jquery.js?v=5d32c60e"></script>
        <script src="../../_static/_sphinx_javascript_frameworks_compat.js?v=2cd50e6c"></script>
        <script src="../../_static/documentation_options.js?v=c8100655"></script>
        <script src="../../_static/doctools.js?v=9a2dae69"></script>
        <script src="../../_static/sphinx_highlight.js?v=dc90522c"></script>
    <script src="../../_static/js/theme.js"></script>
    <!-- begin favicon -->
    <link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png" />
    <link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png" />
    <link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png" />
    <link rel="manifest" href="/site.webmanifest" />
    <link rel="mask-icon" href="/safari-pinned-tab.svg" color="#5bbad5" />
    <meta name="msapplication-TileColor" content="#355b95" />
    <meta name="theme-color" content="#ffffff" />
    <!-- end favicon -->
    
    <link rel="index" title="Index" href="../../genindex.html" />
    <link rel="search" title="Search" href="../../search.html" />
    <link rel="next" title="logtalk_make_target_action/1" href="logtalk_make_target_action_1.html" />
    <link rel="prev" title="logtalk_make/0" href="logtalk_make_0.html" />
   
</head>

<body class="wy-body-for-nav"> 
  <div class="wy-grid-for-nav">
    <nav data-toggle="wy-nav-shift" class="wy-nav-side">
      <div class="wy-side-scroll">
        <div class="wy-side-nav-search" >

          
          
          <a href="../../index.html" class="icon icon-home">
            The Logtalk Handbook
              <img src="../../_static/logtalk.gif" class="logo" alt="Logo"/>
          </a>
              <div class="version">
                3.93.0
              </div>
<div role="search">
  <form id="rtd-search-form" class="wy-form" action="../../search.html" method="get">
    <input type="text" name="q" placeholder="Search docs" aria-label="Search docs" />
    <input type="hidden" name="check_keywords" value="yes" />
    <input type="hidden" name="area" value="default" />
  </form>
</div>
        </div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu">
    
              <p class="caption" role="heading"><span class="caption-text">Contents</span></p>
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="../../userman/index.html">User Manual</a></li>
<li class="toctree-l1 current"><a class="reference internal" href="../index.html">Reference Manual</a><ul class="current">
<li class="toctree-l2"><a class="reference internal" href="../grammar.html">Grammar</a></li>
<li class="toctree-l2"><a class="reference internal" href="../control/index.html">Control constructs</a></li>
<li class="toctree-l2"><a class="reference internal" href="../directives/index.html">Directives</a></li>
<li class="toctree-l2 current"><a class="reference internal" href="index.html">Built-in predicates</a><ul class="current">
<li class="toctree-l3"><a class="reference internal" href="enumerating_entity_predicates.html">Enumerating objects, categories and protocols</a></li>
<li class="toctree-l3"><a class="reference internal" href="enumerating_entity_property_predicates.html">Enumerating objects, categories and protocols properties</a></li>
<li class="toctree-l3"><a class="reference internal" href="creating_entity_predicates.html">Creating new objects, categories and protocols</a></li>
<li class="toctree-l3"><a class="reference internal" href="abolishing_entity_predicates.html">Abolishing objects, categories and protocols</a></li>
<li class="toctree-l3"><a class="reference internal" href="entity_relation_predicates.html">Objects, categories, and protocols relations</a></li>
<li class="toctree-l3"><a class="reference internal" href="event_handling_predicates.html">Event handling</a></li>
<li class="toctree-l3"><a class="reference internal" href="multi_threading_predicates.html">Multi-threading</a></li>
<li class="toctree-l3"><a class="reference internal" href="engine_predicates.html">Multi-threading engines</a></li>
<li class="toctree-l3 current"><a class="reference internal" href="compiling_predicates.html">Compiling and loading source files</a><ul class="current">
<li class="toctree-l4"><a class="reference internal" href="logtalk_compile_1.html"><code class="docutils literal notranslate"><span class="pre">logtalk_compile/1</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="logtalk_compile_2.html"><code class="docutils literal notranslate"><span class="pre">logtalk_compile/2</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="logtalk_load_1.html"><code class="docutils literal notranslate"><span class="pre">logtalk_load/1</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="logtalk_load_2.html"><code class="docutils literal notranslate"><span class="pre">logtalk_load/2</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="logtalk_make_0.html"><code class="docutils literal notranslate"><span class="pre">logtalk_make/0</span></code></a></li>
<li class="toctree-l4 current"><a class="current reference internal" href="#"><code class="docutils literal notranslate"><span class="pre">logtalk_make/1</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="logtalk_make_target_action_1.html"><code class="docutils literal notranslate"><span class="pre">logtalk_make_target_action/1</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="logtalk_library_path_2.html"><code class="docutils literal notranslate"><span class="pre">logtalk_library_path/2</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="logtalk_load_context_2.html"><code class="docutils literal notranslate"><span class="pre">logtalk_load_context/2</span></code></a></li>
</ul>
</li>
<li class="toctree-l3"><a class="reference internal" href="flag_predicates.html">Flags</a></li>
<li class="toctree-l3"><a class="reference internal" href="linter_predicates.html">Linter</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="../methods/index.html">Built-in methods</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../../tutorial/index.html">Tutorial</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../faq/index.html">FAQ</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../devtools/index.html">Developer Tools</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../libraries/index.html">Libraries</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../ports/index.html">Ports</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../contributions/index.html">Contributions</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../glossary.html">Glossary</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../bibliography.html">Bibliography</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../genindex.html">Index</a></li>
</ul>

    <p class="caption"><span class="caption-text">External Contents</span></p>
    <ul>
    <li class="toctree-l1"><a class="reference internal" href="../../../apis/index.html">APIs</a></li>
    <li class="toctree-l1"><a class="reference internal" href="https://logtalk.org">Logtalk website</a></li>
    <li class="toctree-l1"><a class="reference internal" href="https://github.com/LogtalkDotOrg/logtalk3">GitHub repo</a></li>
    </ul>
  
        </div>
      </div>
    </nav>

    <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap"><nav class="wy-nav-top" aria-label="Mobile navigation menu" >
          <i data-toggle="wy-nav-top" class="fa fa-bars"></i>
          <a href="../../index.html">The Logtalk Handbook</a>
      </nav>

      <div class="wy-nav-content">
        <div class="rst-content">
          <div role="navigation" aria-label="Page navigation">
  <ul class="wy-breadcrumbs">
      <li><a href="../../index.html" class="icon icon-home" aria-label="Home"></a></li>
          <li class="breadcrumb-item"><a href="../index.html">Reference Manual</a></li>
          <li class="breadcrumb-item"><a href="index.html">Built-in predicates</a></li>
          <li class="breadcrumb-item"><a href="compiling_predicates.html">Compiling and loading source files</a></li>
      <li class="breadcrumb-item active"><code class="docutils literal notranslate"><span class="pre">logtalk_make/1</span></code></li>
      <li class="wy-breadcrumbs-aside">
              <a href="https://github.com/LogtalkDotOrg/logtalk3/blob/master/docs/handbook/sources/refman/predicates/logtalk_make_1.rst" class="fa fa-github"> Edit on GitHub</a>
      </li>
  </ul>
  <hr/>
</div>
          <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
           <div itemprop="articleBody">
             
  <p class="align-right"><strong>built-in predicate</strong></p>
<section id="logtalk-make-1">
<span id="predicates-logtalk-make-1"></span><span id="index-0"></span><h1><code class="docutils literal notranslate"><span class="pre">logtalk_make/1</span></code><a class="headerlink" href="#logtalk-make-1" title="Link to this heading"></a></h1>
<section id="description">
<h2>Description<a class="headerlink" href="#description" title="Link to this heading"></a></h2>
<div class="highlight-logtalk notranslate"><div class="highlight"><pre><span></span><span class="k">logtalk_make</span>(<span class="nv">Target</span>)
</pre></div>
</div>
<p>Runs a make target. Prints a warning message and fails when the target is
not valid.</p>
<p>Allows reloading all Logtalk source files that have been modified since
last loaded when called with the target <code class="docutils literal notranslate"><span class="pre">all</span></code>, deleting all
intermediate files generated by the compilation of Logtalk source files
when called with the target <code class="docutils literal notranslate"><span class="pre">clean</span></code>, checking for code issues when
called with the target <code class="docutils literal notranslate"><span class="pre">check</span></code>, listing of circular dependencies
between pairs or trios of objects when called with the target
<code class="docutils literal notranslate"><span class="pre">circular</span></code>, generating documentation when called with the target
<code class="docutils literal notranslate"><span class="pre">documentation</span></code>, and deleting the <a class="reference internal" href="../../glossary.html#term-dynamic-binding"><span class="xref std std-term">dynamic binding</span></a> caches with
the target <code class="docutils literal notranslate"><span class="pre">caches</span></code>.</p>
<p>There are also three variants of the <code class="docutils literal notranslate"><span class="pre">all</span></code> target: <code class="docutils literal notranslate"><span class="pre">debug</span></code>,
<code class="docutils literal notranslate"><span class="pre">normal</span></code>, and <code class="docutils literal notranslate"><span class="pre">optimal</span></code>. These targets change the compilation mode
(by changing the default value of the <a class="reference internal" href="../../userman/programming.html#flag-debug"><span class="std std-ref">debug</span></a> and
<a class="reference internal" href="../../userman/programming.html#flag-optimize"><span class="std std-ref">optimize</span></a> flags) and reload all affected files
(i.e., all files loaded without an explicit <code class="docutils literal notranslate"><span class="pre">debug/1</span></code> or <code class="docutils literal notranslate"><span class="pre">optimize/1</span></code>
compiler option).</p>
<p>When using the <code class="docutils literal notranslate"><span class="pre">all</span></code> target, only source files loaded using the
<a class="reference internal" href="logtalk_load_1.html#predicates-logtalk-load-1"><span class="std std-ref">logtalk_load/1</span></a> and <a class="reference internal" href="logtalk_load_2.html#predicates-logtalk-load-2"><span class="std std-ref">logtalk_load/2</span></a>
predicates are reloaded. Non-modified files will also be reloaded when
a previous attempt to load them failed or when there is a change to the
compilation mode (i.e., when the files were loaded without explicit
<a class="reference internal" href="../../userman/programming.html#flag-debug"><span class="std std-ref">debug</span></a> or <a class="reference internal" href="../../userman/programming.html#flag-optimize"><span class="std std-ref">optimize</span></a> flags and
the default values of these flags changed after loading; no check is made,
however, for other implicit compiler flags that may have changed since
loading). When an included file is modified, this target reloads its
main file (i.e., the file that contains the <a class="reference internal" href="../directives/include_1.html#directives-include-1"><span class="std std-ref">include/1</span></a>
directive).</p>
<p>When using the <code class="docutils literal notranslate"><span class="pre">check</span></code> or <code class="docutils literal notranslate"><span class="pre">circular</span></code> targets, be sure to compile
your source files with the <a class="reference internal" href="../../userman/programming.html#flag-source-data"><span class="std std-ref">source_data</span></a> flag
turned on for complete and detailed reports.</p>
<p>The <code class="docutils literal notranslate"><span class="pre">check</span></code> target scans for missing entities (objects, protocols,
categories, and modules), missing entity predicates, and duplicated
library aliases. Predicates for messages sent to objects that implement
the <a class="reference external" href="../../../apis/forwarding_0.html#forwarding-0" title="(in Logtalk APIs v3.93.0)"><span class="xref std std-ref">forwarding</span></a> built-in protocol are not
reported. While this usually avoids only false positives, it may
also result in failure to report true missing predicates in some cases.</p>
<p>When using the <code class="docutils literal notranslate"><span class="pre">circular</span></code> target, be prepared for a lengthy computation
time for applications with a large combined number of objects and message
calls. Only mutual and triangular dependencies are checked due to the
computational cost. Circular dependencies occur when an object sends a
message to a second object that, in turn, sends a message to the first
object. These circular dependencies are often a consequence of lack of
separation of concerns. But, when they cannot be fixed, the only practical
consequence is a small performance cost as some of the messages would be
forced to use dynamic binding.</p>
<p>The <code class="docutils literal notranslate"><span class="pre">documentation</span></code> target requires the <code class="docutils literal notranslate"><span class="pre">doclet</span></code> tool and a single
<a class="reference internal" href="../../glossary.html#term-doclet-object"><span class="xref std std-term">doclet object</span></a> to be loaded. See the <code class="docutils literal notranslate"><span class="pre">doclet</span></code> tool documentation
for more details.</p>
<p>Depending on the <a class="reference internal" href="../../glossary.html#term-backend-Prolog-compiler"><span class="xref std std-term">backend Prolog compiler</span></a>, the following top-level
shortcuts are usually defined:</p>
<ul class="simple">
<li><p><code class="docutils literal notranslate"><span class="pre">{*}</span></code> - <code class="docutils literal notranslate"><span class="pre">logtalk_make(all)</span></code></p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">{!}</span></code> - <code class="docutils literal notranslate"><span class="pre">logtalk_make(clean)</span></code></p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">{?}</span></code> - <code class="docutils literal notranslate"><span class="pre">logtalk_make(check)</span></code></p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">{&#64;}</span></code> - <code class="docutils literal notranslate"><span class="pre">logtalk_make(circular)</span></code></p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">{#}</span></code> - <code class="docutils literal notranslate"><span class="pre">logtalk_make(documentation)</span></code></p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">{$}</span></code> - <code class="docutils literal notranslate"><span class="pre">logtalk_make(caches)</span></code></p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">{+d}</span></code> - <code class="docutils literal notranslate"><span class="pre">logtalk_make(debug)</span></code></p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">{+n}</span></code> - <code class="docutils literal notranslate"><span class="pre">logtalk_make(normal)</span></code></p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">{+o}</span></code> - <code class="docutils literal notranslate"><span class="pre">logtalk_make(optimal)</span></code></p></li>
</ul>
<p>Check the <a class="reference internal" href="../../glossary.html#term-adapter-file"><span class="xref std std-term">adapter files</span></a> for the availability of
these shortcuts as they are not part of the language.</p>
<div class="admonition warning">
<p class="admonition-title">Warning</p>
<p>Only use the shortcuts at the top-level interpreter and
never in source files.</p>
</div>
<p>The target actions can be extended by defining clauses for the multifile
and dynamic hook predicate
<a class="reference internal" href="logtalk_make_target_action_1.html#predicates-logtalk-make-target-action-1"><span class="std std-ref">logtalk_make_target_action(Target)</span></a>
where <code class="docutils literal notranslate"><span class="pre">Target</span></code> is one of the targets listed above. The additional
user-defined actions are run after the default ones.</p>
</section>
<section id="modes-and-number-of-proofs">
<h2>Modes and number of proofs<a class="headerlink" href="#modes-and-number-of-proofs" title="Link to this heading"></a></h2>
<div class="highlight-logtalk notranslate"><div class="highlight"><pre><span></span><span class="k">logtalk_make</span>(<span class="o">+</span>atom) <span class="o">-</span> zero_or_one
</pre></div>
</div>
</section>
<section id="errors">
<h2>Errors<a class="headerlink" href="#errors" title="Link to this heading"></a></h2>
<p>(none)</p>
</section>
<section id="examples">
<h2>Examples<a class="headerlink" href="#examples" title="Link to this heading"></a></h2>
<div class="highlight-logtalk notranslate"><div class="highlight"><pre><span></span><span class="c">% reload loaded source files in debug mode:</span>
| <span class="o">?-</span> <span class="k">logtalk_make</span>(debug).

<span class="c">% check for code issues in the loaded source files:</span>
| <span class="o">?-</span> <span class="k">logtalk_make</span>(check).

<span class="c">% delete all intermediate files generated by</span>
<span class="c">% the compilation of Logtalk source files:</span>
| <span class="o">?-</span> <span class="k">logtalk_make</span>(clean).
</pre></div>
</div>
<div class="admonition seealso">
<p class="admonition-title">See also</p>
<p><a class="reference internal" href="logtalk_compile_1.html#predicates-logtalk-compile-1"><span class="std std-ref">logtalk_compile/1</span></a>,
<a class="reference internal" href="logtalk_compile_2.html#predicates-logtalk-compile-2"><span class="std std-ref">logtalk_compile/2</span></a>,
<a class="reference internal" href="logtalk_load_1.html#predicates-logtalk-load-1"><span class="std std-ref">logtalk_load/1</span></a>,
<a class="reference internal" href="logtalk_load_2.html#predicates-logtalk-load-2"><span class="std std-ref">logtalk_load/2</span></a>,
<a class="reference internal" href="logtalk_make_0.html#predicates-logtalk-make-0"><span class="std std-ref">logtalk_make/0</span></a>,
<a class="reference internal" href="logtalk_make_target_action_1.html#predicates-logtalk-make-target-action-1"><span class="std std-ref">logtalk_make_target_action/1</span></a></p>
</div>
</section>
</section>


           </div>
          </div>
          <footer><div class="rst-footer-buttons" role="navigation" aria-label="Footer">
        <a href="logtalk_make_0.html" class="btn btn-neutral float-left" title="logtalk_make/0" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Previous</a>
        <a href="logtalk_make_target_action_1.html" class="btn btn-neutral float-right" title="logtalk_make_target_action/1" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
    </div>

  <hr/>

  <div role="contentinfo">
    <p>&#169; Copyright 1998-2025, Paulo Moura.</p>
  </div>

  Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
    <a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a>
    provided by <a href="https://readthedocs.org">Read the Docs</a>.
   

</footer>
        </div>
      </div>
    </section>
  </div>
  <script>
      jQuery(function () {
          SphinxRtdTheme.Navigation.enable(true);
      });
  </script> 

</body>
</html>